<template>
  <custom-navbar title="商品详情"></custom-navbar>
  <view class="u-demo-block">
    <up-swiper
      :list="swiperList"
      indicator
      indicatorMode="line"
      circular
    ></up-swiper>
  </view>
</template>

<script setup lang="ts">
import { onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import { goodsDetailApi } from "@/api/index.js";
import swiper3 from "@/static/images/swiper3.png";
import swiper2 from "@/static/images/swiper2.png";
import swiper1 from "@/static/images/swiper1.png";
// swiper
const swiperList = ref([swiper3, swiper2, swiper1]);

async function getGoodsDetail(goodsId) {
  const res = await goodsDetailApi(goodsId);
  console.log(res);
}
onLoad((options) => {
  console.log(options);
  const { goodsId } = options;
  getGoodsDetail(goodsId);
});
</script>

<style></style>
